package net.labdemo.entity;

import java.util.Date;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

import net.labdemo.common.entity.BaseEntity;

/**
 * 用户
 * @author xiaofanku
 * 20160609
 */
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class User extends BaseEntity<User> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 邮箱
	 */
	private String mail;
	/**
	 * 昵称
	 */
	private String nickname;
	/**
	 * 密码盐
	 */
	private String salt;
	/**
	 * 输入的原始密码
	 */
	private String inpswd;
	/**
	 * 加上盐sha-256散列后的密码
	 * 或数据库的密码
	 */
	private String pswd;
	/**
	 * 注册的日期
	 */
	private Date birthday;
	/**
	 * 最近活跃的日期
	 */
	private Date active;
	/**
	 * 状态,1可用,2锁定,3异常,4冰封
	 */
	private int status;
	
	public String getMail() {
		return mail;
	}
	public void setMail(String mail) {
		this.mail = mail;
	}
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	public String getSalt() {
		return salt;
	}
	public void setSalt(String salt) {
		this.salt = salt;
	}
	public String getInpswd() {
		return inpswd;
	}
	public void setInpswd(String inpswd) {
		this.inpswd = inpswd;
	}
	public String getPswd() {
		return pswd;
	}
	public void setPswd(String pswd) {
		this.pswd = pswd;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public Date getActive() {
		return active;
	}
	public void setActive(Date active) {
		this.active = active;
	}

	@Override
	public String toString() {
		return "User [mail=" + mail + ", nickname=" + nickname + ", inpswd="+inpswd+", salt=" + salt + ", pswd=" + pswd + ", birthday="
				+ birthday + ", status=" + status + "]";
	}
	
}
